package com.chuji.crmcj.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;

import com.chuji.crmcj.R;

public class BelowDialog extends Dialog {

	private FrameLayout mLayout;
    private Window window;
	//把我们自己的样式传给父类
	//屏蔽父类里面的样式
	public BelowDialog(Context context, FrameLayout mLayout) {
		super(context, R.style.AddressDialogStyle);
		this.mLayout=mLayout;
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(mLayout);
		window = getWindow();
		//获取到当前窗体的样式
		WindowManager.LayoutParams params = window.getAttributes();
		params.gravity = Gravity.BOTTOM;
//				| Gravity.CENTER_HORIZONTAL;
		//设置窗体的属性
		window.setAttributes(params);
	}
}